[Template:scriptincludes.html]
<script>
			
	$(function() {	
		$("#tabs").tabs();					
	}); 

$(document).ready(function(){

//websites
var myParams = {cmd: "getdata",templ: "clientweb.xsl",ctltype: "WEBSITE",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]')"};
var cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.websitedetails', '', cmdget);

//Urls
myParams = {cmd: "getdata",templ: "clienturl.xsl",ctltype: "URL",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]')"};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.urldetails', '', cmdget);

//Invoices
myParams = {cmd: "getdata",templ: "clientinv.xsl",ctltype: "INVOICES",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]') and ([xmlData].value('(genxml/radiobuttonlist/rblstatus)[[1]]', 'nvarchar(10)') = 'STATUS2')"};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.invdetails', '', cmdget);

//Estimates
myParams = {cmd: "getdata",templ: "clientest.xsl",ctltype: "ESTIMATES",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]') and ([xmlData].value('(genxml/checkbox/chkarchived)[[1]]', 'nvarchar(10)') = 'False')"};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.estdetails', '', cmdget);

//Outstanding Payments
myParams = {cmd: "getdata",templ: "clientout.xsl",ctltype: "INSTALLMENT%",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]') and (convert(decimal(18,2),isnull(([xmlData].value('(genxml/hidden/dbltotaldue)[[1]]', 'nvarchar(10)')),0)) > 0) "};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.outdetails', '', cmdget);

//Email Redirect
myParams = {cmd: "getdata",templ: "clientemail.xsl",ctltype: "URLEMAIL%",filter: " and ([xmlData].value('(genxml/hidden/clientidonemail)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]')"};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.emaildetails', '', cmdget);

//Get Outstanding Balance
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?cmd=getoutbal&itemid=[<tag type="valueof" xpath="genxml/hidden/itemid" />]';
$.get(cmdget, function (data) {
	$('.outbalance').html('<h1>Total Outstanding : ' + data + '</h1>');
});

$( ".RadioButton" ).buttonset();
	
});

//Projects
myParams = {cmd: "getdata",templ: "clientprojects.xsl",ctltype: "PROJECT",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]')"};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.projects', '', cmdget);

//Tasks
myParams = {cmd: "getdata",templ: "taskslist.xsl",ctltype: "TASKS",filter: " and ([xmlData].value('(genxml/hidden/clientid)[[1]]', 'nvarchar(10)') = '[<tag type="valueof" xpath="genxml/hidden/itemid" />]')"};
cmdget = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?' + jQuery.param(myParams);
$.fn.initlist('.tasks', '', cmdget);


</script>	
<div class="nwb-button-group">
[<tag id="cmdUpdate2" type="linkbutton" text="Update Exit" tooltip="Update" cssclass="nwb-button primary icon approve" commandname="Updateexit" commandargument="ItemID"/>]&nbsp;
[<tag id="cmdUpdate1" type="linkbutton" text="Update" tooltip="Update" cssclass="nwb-button primary icon approve" commandname="Update" commandargument="ItemID"/>]&nbsp;
[<tag id="cmdCreateTask" type="linkbutton" text=" Create Task" tooltip="Create Task for Client" cssclass="nwb-button primary icon add" commandname="createtask" commandargument="ItemID" />]&nbsp;
[<tag id="cmdGoTasks" type="linkbutton" text=" View Tasks" tooltip="View Client Tasks" cssclass="nwb-button icon search" commandname="gotasks" commandargument="ItemID" />]&nbsp;
[<tag id="cmdDelete1" type="linkbutton" text=" Delete" tooltip="Delete" cssclass="nwb-button danger icon remove" commandname="Delete" commandargument="ItemID" confirm="Delete Item?" />]&nbsp;
[<tag id="cmdCancel1" type="linkbutton" text=" Cancel" tooltip="Cancel" cssclass="nwb-button danger" commandname="Cancel" commandargument="ItemID" causesvalidation="False"/>]&nbsp;
[<tag id="cmdPrintReport" type="linkbutton" text=" Client Report" tooltip="Client Report" cssclass="nwb-button" commandname="printreport" commandargument="ItemID" causesvalidation="False" />]&nbsp;

</div>
<div>
[<tag id="UserID" type="hidden" value="" />]
[<tag id="ClientID" type="hidden" value="" />]
[<tag id="ItemID" type="hidden" value="databind:ItemID" />]
[<tag id="dteModifiedDate" type="hidden" value="" />]
[<tag id="LockedBy" type="hidden" value="" />]
[<tag id="htmlDisplayLockedBy" type="hidden" value="" />]
[<tag type="valueof" xpath="genxml/hidden/htmldisplaylockedby" />]
<table class="normal" border="0px" cellpadding="1px" cellspacing = "1px">
<tr>
<td align="right">Type : </td>
<td colspan="3">[<tag id="rblType" type="radiobuttonlist" datavalue="1;2;4;5;3" data="Client;Potential;Partner;Prospect;Non-Client" tabindex="14" repeatdirection="0" selectedvalue="1" />]</td>
<td align="right"></td>
<td></td>
</tr>
<tr>
<td align="right">Client Ref : </td>
<td>[<tag id="txtClientRef" type="textbox" width="250" maxlength="200" tabindex="1" />]</td>
<td align="right">Address : </td>
<td>[<tag id="txtClientAdd1" type="textbox" width="250" maxlength="200" tabindex="7" />]</td>
</tr>
<tr>
<td align="right">UserName : </td>
<td>[<tag id="txtUserName" type="textbox" width="250" maxlength="200"  tabindex="2" />]</td>
<td align="right"></td>
<td>[<tag id="txtClientAdd2" type="textbox" width="250" maxlength="200" tabindex="8" />]</td>
</tr>
<tr>
<td align="right">Client Name : </td>
<td>[<tag id="txtClientName" type="textbox" width="250" maxlength="200" tabindex="3" />]</td>
<td align="right">Post Code : </td>
<td>[<tag id="txtClientPC" type="textbox" width="250" maxlength="200" tabindex="9" />]</td>
</tr>
<tr>
<td align="right">Company Name : </td>
<td>[<tag id="txtCompanyName" type="textbox" width="250" maxlength="200" tabindex="4" />]</td>
<td align="right">Town : </td>
<td>[<tag id="txtClientAdd3" type="textbox" width="250" maxlength="200" tabindex="10" />]</td>
</tr>
<tr>
<td align="right">SIRET No.</td>
<td>[<tag id="txtSIRET" type="textbox" width="250" maxlength="200" tabindex="5" />]</td>
<td align="right">Tel1 : </td>
<td>[<tag id="txtTel1" type="textbox" width="250" maxlength="200" tabindex="11" />]</td>
</tr>
<tr>
<td style="text-align: right">TVA No.</td>
<td>[<tag id="txtTVA" type="textbox" width="250" maxlength="200" tabindex="6" />]</td>
<td align="right">Tel2 : </td>
<td>[<tag id="txtTel2" type="textbox" width="250" maxlength="200" tabindex="12" />]</td>
</tr>
<tr>
<td align="right">Client Language : </td>
<td>[<tag id="ddlClientLang" type="dropdownlist" data="fr-FR;en-GB" />][<tag id="chkEnableEmail" type="checkbox" text="Enable Client Email" />]</td>
<td align="right">Email : </td>
<td>[<tag id="txtPersonalEmail" type="textbox" width="250" maxlength="200" tabindex="13" />]</td>
</tr>
<tr>
<td align="right">EBP Ref : </td>
<td>[<tag id="txtEBPRef" type="textbox" width="250" maxlength="200" tabindex="14" />]</td>
<td align="right"></td>
<td></td>
</tr>
<tr>
<td align="right">Sector : </td>
<td>[<tag id="ddlClientSector" type="dropdownlist" width="150" datavalue="0;1;2;3;4;5;6;7;8;9;10;11" data=";Tourisme;Industrie;Sports/Loisirs;Éducation;Bâtiment;Agriculture;Santé;Juridique;Culture/Arts;Transports/Auto;Other" />]</td>
<td align="right">Type : </td>
<td>[<tag id="ddlClientType" type="dropdownlist" width="150" datavalue="0;1;2;3;4;5;6;7;9;8" data=";Commerçant / TPE;Artisan / TPE;Service / TPE;Autre TPE;PME;Groupe;Collectivité ou institution;Association;Other" />]</td>
</tr>
<tr>
<td>Other Contact</td>
<td>[<tag id="txtContactName1" type="textbox" width="250" maxlength="200" tabindex="15" />]</td>
<td colspan="2">Tel : [<tag id="txtContactTel1" type="textbox" width="150" maxlength="16" tabindex="3" />]  Email : [<tag id="txtContactEmail1" type="textbox" width="200" maxlength="150" tabindex="17" />]</td>
</tr>
<tr>
<td>Other Contact</td>
<td>[<tag id="txtContactName2" type="textbox" width="250" maxlength="200" tabindex="18" />]</td>
<td colspan="2">Tel : [<tag id="txtContactTel2" type="textbox" width="150" maxlength="19" tabindex="3" />]  Email : [<tag id="txtContactEmail2" type="textbox" width="200" maxlength="150" tabindex="20" />]</td>
</tr>
<tr>
<td align="right">Support Group : </td>
<td>[<tag id="rblSupportLevel" cssclass="RadioButton" type="radiobuttonlist" data="1;2;3;4;5"  repeatdirection="0" />]</td>
<td align="right"></td>
<td></td>
</tr>

</table>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">Outstanding</a></li>
				<li><a href="#tabs-2">Estimates</a></li>
				<li><a href="#tabs-3">Invoices</a></li>
				<li><a href="#tabs-4">Websites</a></li>
				<li><a href="#tabs-5">Urls</a></li>
				<li><a href="#tabs-6">Email Redirects</a></li>
				<li><a href="#tabs-8">Projects</a></li>
				<li><a href="#tabs-9">Tasks</a></li>
				<li><a href="#tabs-7">History</a></li>
			</ul>
			<div id="tabs-1">		
				<div class="outbalance">
				</div>
				<div class="outdetails">
				</div>
			</div>
			<div id="tabs-2">
				<div class="estdetails">
				</div>
			</div>
			<div id="tabs-3">
				<div class="invdetails">
				</div>
			</div>
			<div id="tabs-4">
				<div class="websitedetails">
				</div>
			</div>
			<div id="tabs-5">
				<div class="urldetails">
				</div>
			</div>
			<div id="tabs-6">
				<div class="emaildetails">
				</div>
			</div>
			<div id="tabs-8">
				<div class="projects">
				</div>
			</div>
			<div id="tabs-9">
				<div class="tasks">
				</div>
			</div>
			<div id="tabs-7">
			[Template:HistoryAuditCtrl.html]	
			</div>
		</div>

        <font size="1px">Last Modified : [<tag type="valueof" xpath="genxml/hidden/dtemodifieddate" />]</font>
</div>

